import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 晓星航
 * Date: 2023-08-09
 * Time: 22:01
 */
public class IODemo6 {
    public static void main(String[] args) {
        try (Writer writer = new FileWriter("d:/test.txt")){
            writer.write("hello world");
        }catch (IOException e) {
            e.printStackTrace();
        }
    }
}
